Repository navigation
fix: roll back auth on restricted-bucket failure, correct an assert message, guard args, parse the pydantic version, and fix part-size mapping - #719
Merged
Conversation
|
Warning Review limit reachedThis organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing. Next included review available in 59 minutes. View limit details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Address C55, C28, C51, C31, and C33 from the low-severity audit.
Root cause
Authorization persisted credentials before checking deleted-bucket restrictions. The remaining defects were an incorrect assertion interpolation, unchecked exception argument indexes, a lexical version comparison, and a minimum part size forwarded as the recommended size.
Changes
Bucket.upload(min_part_size=...)to the planner's minimum and clarify the docstring.Verification
Each finding was observed red before its production fix, then green. A separate pristine archive of master
dd366eb3, with only the final regression tests overlaid, also reproduces all five findings: 17 failed, 4 passed. The identical focused v3 selection on this branch is 21 passed:pytest --api=v3 test/unit/bucket/test_regression_bucket.py test/unit/test_regression_misc.py test/unit/test_session.py -k 'c55 or c28 or c51 or c31 or c33' -qFull unit suites and doctests on Python 3.13.15, using
pytest --api=<version> --doctest-modules -n 4 test/unit -q --tb=short:ruff check b2sdk test noxfile.py: passed.ruff format --checkon all nine changed Python files: passed.python -m nox --no-venv -s towncrier_check: passed.git diff --check: passed.pytest test/static: 64 passed, 2 failed from existing strict XPASS markers for already-fixed C30/C59. The same two failures are present in master's CI. Whole-repository format checking also flags unchanged masternoxfile.py; these unrelated files are untouched.Refs #711